import os
os.getcwd()
os.chdir('C:\\Users\\shenhua\\Desktop\\HeadFirstPython\\Chapter3')
os.getcwd()
try:
	data=open('sketch.txt')
	data.seek(0)
	for each_line in data:
		try:
			(role,line_spoken)=each_line.split(':',1)
			print(role,end='')
			print(' said: ',end='')
			print(line_spoken,end='')
		except ValueError:
			pass
	data.close()
except IOError:
	print('miss txt')
